package com.shangqing.document_management.entity;

import java.io.Serializable;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

public class User implements Serializable {
    private Integer id;
    @NotNull(message="用户名不能为空")
    private String username;
    @Size(min=8,max = 16,message = "最小值为8最大值为16")
    @NotNull(message="密码不能为空")
    private String password;
    @NotNull(message="身份证号码不能为空")
    private String idcard;
    @NotNull(message="手机号不能为空")
    private String phone;
    private Integer roleid;
    public User(){}

    public User(Integer id, String username, String password, String idcard, String phone, Integer roleid) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.idcard = idcard;
        this.phone = phone;
        this.roleid=roleid;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getIdcard() {
        return idcard;
    }

    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getRoleid() {
        return roleid;
    }

    public void setRoleid(Integer roleid) {
        this.roleid = roleid;
    }
}
